﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace Lilium.Web.Mvc
{
	public sealed class CssReferenceAttribute: ScriptResourceReferenceAttribute
	{
		public CssReferenceAttribute(string libraryName, string resourceName)
		{
			if (string.IsNullOrEmpty(libraryName))
				throw new ArgumentNullOrEmptyException("libraryName");
			if (string.IsNullOrEmpty(resourceName))
				throw new ArgumentNullOrEmptyException("resourceName");

			m_LibraryName = libraryName;
			m_ResourceName = resourceName;
		}

		public override IEnumerable<IScriptResourceReference> GetResourceReferences()
		{
			yield return new CssReference(LibraryName, ResourceName);
		}

		#region public string LibraryName

		private readonly string m_LibraryName;

		public string LibraryName { [DebuggerNonUserCodeAttribute] get { return m_LibraryName; } }

		#endregion

		#region public string ResourceName

		private readonly string m_ResourceName;

		public string ResourceName { [DebuggerNonUserCodeAttribute] get { return m_ResourceName; } }

		#endregion

	}
}
